//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_spi(SotoInternal) import SotoCore

extension Chatbot {
    // MARK: Enums

    public enum CustomActionAttachmentCriteriaOperator: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case equals = "EQUALS"
        case hasValue = "HAS_VALUE"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct AccountPreferences: AWSDecodableShape {
        /// Turns on training data collection. This helps improve the AWS Chatbot experience by allowing AWS Chatbot to store and use your customer information, such as AWS Chatbot configurations, notifications, user inputs, AWS Chatbot generated responses, and interaction data. This data helps us to continuously improve and develop Artificial Intelligence (AI) technologies. Your data is not shared with any third parties and is protected using sophisticated controls to prevent unauthorized access and misuse. AWS Chatbot does not store or use interactions in chat channels with Amazon Q for training AI technologies for AWS Chatbot.
        public let trainingDataCollectionEnabled: Bool?
        /// Enables use of a user role requirement in your chat configuration.
        public let userAuthorizationRequired: Bool?

        @inlinable
        public init(trainingDataCollectionEnabled: Bool? = nil, userAuthorizationRequired: Bool? = nil) {
            self.trainingDataCollectionEnabled = trainingDataCollectionEnabled
            self.userAuthorizationRequired = userAuthorizationRequired
        }

        private enum CodingKeys: String, CodingKey {
            case trainingDataCollectionEnabled = "TrainingDataCollectionEnabled"
            case userAuthorizationRequired = "UserAuthorizationRequired"
        }
    }

    public struct AssociateToConfigurationRequest: AWSEncodableShape {
        /// The channel configuration to associate with the resource.
        public let chatConfiguration: String
        /// The resource Amazon Resource Name (ARN) to link.
        public let resource: String

        @inlinable
        public init(chatConfiguration: String, resource: String) {
            self.chatConfiguration = chatConfiguration
            self.resource = resource
        }

        public func validate(name: String) throws {
            try self.validate(self.chatConfiguration, name: "chatConfiguration", parent: name, max: 1169)
            try self.validate(self.chatConfiguration, name: "chatConfiguration", parent: name, min: 19)
            try self.validate(self.chatConfiguration, name: "chatConfiguration", parent: name, pattern: "^arn:aws:(wheatley|chatbot):[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            try self.validate(self.resource, name: "resource", parent: name, max: 1011)
            try self.validate(self.resource, name: "resource", parent: name, min: 1)
            try self.validate(self.resource, name: "resource", parent: name, pattern: "^arn:aws:chatbot:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:custom-action/[a-zA-Z0-9_-]{1,64}$")
        }

        private enum CodingKeys: String, CodingKey {
            case chatConfiguration = "ChatConfiguration"
            case resource = "Resource"
        }
    }

    public struct AssociateToConfigurationResult: AWSDecodableShape {
        public init() {}
    }

    public struct AssociationListing: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the resource (for example, a custom action).
        public let resource: String

        @inlinable
        public init(resource: String) {
            self.resource = resource
        }

        private enum CodingKeys: String, CodingKey {
            case resource = "Resource"
        }
    }

    public struct ChimeWebhookConfiguration: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the ChimeWebhookConfiguration.
        public let chatConfigurationArn: String
        /// The name of the configuration.
        public let configurationName: String?
        /// A user-defined role that AWS Chatbot assumes. This is not the service-linked role. For more information, see IAM policies for AWS Chatbot in the  AWS Chatbot Administrator Guide.
        public let iamRoleArn: String
        /// Logging levels include ERROR, INFO, or NONE.
        public let loggingLevel: String?
        /// The Amazon Resource Names (ARNs) of the SNS topics that deliver notifications to AWS Chatbot.
        public let snsTopicArns: [String]
        /// Either ENABLED or DISABLED. The resource returns DISABLED if the organization's AWS Chatbot policy has explicitly denied that configuration.
        /// 	  For example, if Amazon Chime is disabled.
        public let state: String?
        /// Provided if State is DISABLED. Provides context as to why the resource is disabled.
        public let stateReason: String?
        /// A map of tags assigned to a resource. A tag is a string-to-string map of key-value pairs.
        public let tags: [Tag]?
        /// A description of the webhook. We recommend using the convention RoomName/WebhookName. For more information, see Tutorial: Get started with Amazon Chime in the  AWS Chatbot Administrator Guide.
        public let webhookDescription: String

        @inlinable
        public init(chatConfigurationArn: String, configurationName: String? = nil, iamRoleArn: String, loggingLevel: String? = nil, snsTopicArns: [String], state: String? = nil, stateReason: String? = nil, tags: [Tag]? = nil, webhookDescription: String) {
            self.chatConfigurationArn = chatConfigurationArn
            self.configurationName = configurationName
            self.iamRoleArn = iamRoleArn
            self.loggingLevel = loggingLevel
            self.snsTopicArns = snsTopicArns
            self.state = state
            self.stateReason = stateReason
            self.tags = tags
            self.webhookDescription = webhookDescription
        }

        private enum CodingKeys: String, CodingKey {
            case chatConfigurationArn = "ChatConfigurationArn"
            case configurationName = "ConfigurationName"
            case iamRoleArn = "IamRoleArn"
            case loggingLevel = "LoggingLevel"
            case snsTopicArns = "SnsTopicArns"
            case state = "State"
            case stateReason = "StateReason"
            case tags = "Tags"
            case webhookDescription = "WebhookDescription"
        }
    }

    public struct ConfiguredTeam: AWSDecodableShape {
        /// Either ENABLED or DISABLED. The resource returns DISABLED if the organization's AWS Chatbot policy has explicitly denied that configuration.
        /// 	  For example, if Amazon Chime is disabled.
        public let state: String?
        /// Provided if State is DISABLED. Provides context as to why the resource is disabled.
        public let stateReason: String?
        ///  The ID of the Microsoft Teams authorized with AWS Chatbot. To get the team ID, you must perform the initial authorization flow with Microsoft Teams in the AWS Chatbot console. Then you can copy and paste the team ID from the console. For more information, see Step 1: Configure a Microsoft Teams client in the  AWS Chatbot Administrator Guide.
        public let teamId: String
        /// The name of the Microsoft Teams Team.
        public let teamName: String?
        /// The ID of the Microsoft Teams tenant.
        public let tenantId: String

        @inlinable
        public init(state: String? = nil, stateReason: String? = nil, teamId: String, teamName: String? = nil, tenantId: String) {
            self.state = state
            self.stateReason = stateReason
            self.teamId = teamId
            self.teamName = teamName
            self.tenantId = tenantId
        }

        private enum CodingKeys: String, CodingKey {
            case state = "State"
            case stateReason = "StateReason"
            case teamId = "TeamId"
            case teamName = "TeamName"
            case tenantId = "TenantId"
        }
    }

    public struct CreateChimeWebhookConfigurationRequest: AWSEncodableShape {
        /// The name of the configuration.
        public let configurationName: String
        /// A user-defined role that AWS Chatbot assumes. This is not the service-linked role. For more information, see IAM policies for AWS Chatbot in the  AWS Chatbot Administrator Guide.
        public let iamRoleArn: String
        /// Logging levels include ERROR, INFO, or NONE.
        public let loggingLevel: String?
        /// The Amazon Resource Names (ARNs) of the SNS topics that deliver notifications to AWS Chatbot.
        public let snsTopicArns: [String]
        /// A map of tags assigned to a resource. A tag is a string-to-string map of key-value pairs.
        public let tags: [Tag]?
        /// A description of the webhook. We recommend using the convention RoomName/WebhookName. For more information, see Tutorial: Get started with Amazon Chime in the  AWS Chatbot Administrator Guide.
        public let webhookDescription: String
        /// The URL for the Amazon Chime webhook.
        public let webhookUrl: String

        @inlinable
        public init(configurationName: String, iamRoleArn: String, loggingLevel: String? = nil, snsTopicArns: [String], tags: [Tag]? = nil, webhookDescription: String, webhookUrl: String) {
            self.configurationName = configurationName
            self.iamRoleArn = iamRoleArn
            self.loggingLevel = loggingLevel
            self.snsTopicArns = snsTopicArns
            self.tags = tags
            self.webhookDescription = webhookDescription
            self.webhookUrl = webhookUrl
        }

        public func validate(name: String) throws {
            try self.validate(self.configurationName, name: "configurationName", parent: name, max: 128)
            try self.validate(self.configurationName, name: "configurationName", parent: name, min: 1)
            try self.validate(self.configurationName, name: "configurationName", parent: name, pattern: "^[A-Za-z0-9-_]+$")
            try self.validate(self.iamRoleArn, name: "iamRoleArn", parent: name, max: 1224)
            try self.validate(self.iamRoleArn, name: "iamRoleArn", parent: name, min: 12)
            try self.validate(self.iamRoleArn, name: "iamRoleArn", parent: name, pattern: "^arn:aws:[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            try self.validate(self.loggingLevel, name: "loggingLevel", parent: name, max: 5)
            try self.validate(self.loggingLevel, name: "loggingLevel", parent: name, min: 4)
            try self.validate(self.loggingLevel, name: "loggingLevel", parent: name, pattern: "^(ERROR|INFO|NONE)$")
            try self.snsTopicArns.forEach {
                try validate($0, name: "snsTopicArns[]", parent: name, max: 1224)
                try validate($0, name: "snsTopicArns[]", parent: name, min: 12)
                try validate($0, name: "snsTopicArns[]", parent: name, pattern: "^arn:aws:[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            }
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.webhookDescription, name: "webhookDescription", parent: name, max: 255)
            try self.validate(self.webhookDescription, name: "webhookDescription", parent: name, min: 1)
            try self.validate(self.webhookUrl, name: "webhookUrl", parent: name, max: 255)
            try self.validate(self.webhookUrl, name: "webhookUrl", parent: name, min: 1)
            try self.validate(self.webhookUrl, name: "webhookUrl", parent: name, pattern: "^https://hooks\\.chime\\.aws/incomingwebhooks/[A-Za-z0-9\\-]+?\\?token=[A-Za-z0-9\\-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case configurationName = "ConfigurationName"
            case iamRoleArn = "IamRoleArn"
            case loggingLevel = "LoggingLevel"
            case snsTopicArns = "SnsTopicArns"
            case tags = "Tags"
            case webhookDescription = "WebhookDescription"
            case webhookUrl = "WebhookUrl"
        }
    }

    public struct CreateChimeWebhookConfigurationResult: AWSDecodableShape {
        /// An Amazon Chime webhook configuration.
        public let webhookConfiguration: ChimeWebhookConfiguration?

        @inlinable
        public init(webhookConfiguration: ChimeWebhookConfiguration? = nil) {
            self.webhookConfiguration = webhookConfiguration
        }

        private enum CodingKeys: String, CodingKey {
            case webhookConfiguration = "WebhookConfiguration"
        }
    }

    public struct CreateCustomActionRequest: AWSEncodableShape {
        /// The name of the custom action. This name is included in the Amazon Resource Name (ARN).
        public let actionName: String
        /// The name used to invoke this action in a chat channel. For example, @aws run my-alias.
        public let aliasName: String?
        /// Defines when this custom action button should be attached to a notification.
        public let attachments: [CustomActionAttachment]?
        /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, subsequent retries with the same client token returns the result from the original successful request. If you do not specify a client token, one is automatically generated by the SDK.
        public let clientToken: String?
        /// The definition of the command to run when invoked as an alias or as an action button.
        public let definition: CustomActionDefinition
        /// A map of tags assigned to a resource. A tag is a string-to-string map of key-value pairs.
        public let tags: [Tag]?

        @inlinable
        public init(actionName: String, aliasName: String? = nil, attachments: [CustomActionAttachment]? = nil, clientToken: String? = CreateCustomActionRequest.idempotencyToken(), definition: CustomActionDefinition, tags: [Tag]? = nil) {
            self.actionName = actionName
            self.aliasName = aliasName
            self.attachments = attachments
            self.clientToken = clientToken
            self.definition = definition
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.actionName, name: "actionName", parent: name, max: 64)
            try self.validate(self.actionName, name: "actionName", parent: name, min: 1)
            try self.validate(self.actionName, name: "actionName", parent: name, pattern: "^[a-zA-Z0-9_-]{1,64}$")
            try self.validate(self.aliasName, name: "aliasName", parent: name, max: 30)
            try self.validate(self.aliasName, name: "aliasName", parent: name, min: 1)
            try self.validate(self.aliasName, name: "aliasName", parent: name, pattern: "^[A-Za-z0-9-_]+$")
            try self.attachments?.forEach {
                try $0.validate(name: "\(name).attachments[]")
            }
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 126)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 33)
            try self.validate(self.clientToken, name: "clientToken", parent: name, pattern: "^[\\x21-\\x7F]+$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case actionName = "ActionName"
            case aliasName = "AliasName"
            case attachments = "Attachments"
            case clientToken = "ClientToken"
            case definition = "Definition"
            case tags = "Tags"
        }
    }

    public struct CreateCustomActionResult: AWSDecodableShape {
        /// The fully defined ARN of the custom action.
        public let customActionArn: String

        @inlinable
        public init(customActionArn: String) {
            self.customActionArn = customActionArn
        }

        private enum CodingKeys: String, CodingKey {
            case customActionArn = "CustomActionArn"
        }
    }

    public struct CreateSlackChannelConfigurationRequest: AWSEncodableShape {
        /// The name of the configuration.
        public let configurationName: String
        /// The list of IAM policy ARNs that are applied as channel guardrails. The AWS managed AdministratorAccess policy is applied by default if this is not set.
        public let guardrailPolicyArns: [String]?
        /// A user-defined role that AWS Chatbot assumes. This is not the service-linked role. For more information, see IAM policies for AWS Chatbot in the  AWS Chatbot Administrator Guide.
        public let iamRoleArn: String
        /// Logging levels include ERROR, INFO, or NONE.
        public let loggingLevel: String?
        /// The ID of the Slack channel. To get this ID, open Slack, right click on the channel name in the left pane, then choose Copy Link. The channel ID is the 9-character string at the end of the URL. For example, ABCBBLZZZ.
        public let slackChannelId: String
        /// The name of the Slack channel.
        public let slackChannelName: String?
        /// The ID of the Slack workspace authorized with AWS Chatbot.
        public let slackTeamId: String
        /// The Amazon Resource Names (ARNs) of the SNS topics that deliver notifications to AWS Chatbot.
        public let snsTopicArns: [String]?
        /// A map of tags assigned to a resource. A tag is a string-to-string map of key-value pairs.
        public let tags: [Tag]?
        /// Enables use of a user role requirement in your chat configuration.
        public let userAuthorizationRequired: Bool?

        @inlinable
        public init(configurationName: String, guardrailPolicyArns: [String]? = nil, iamRoleArn: String, loggingLevel: String? = nil, slackChannelId: String, slackChannelName: String? = nil, slackTeamId: String, snsTopicArns: [String]? = nil, tags: [Tag]? = nil, userAuthorizationRequired: Bool? = nil) {
            self.configurationName = configurationName
            self.guardrailPolicyArns = guardrailPolicyArns
            self.iamRoleArn = iamRoleArn
            self.loggingLevel = loggingLevel
            self.slackChannelId = slackChannelId
            self.slackChannelName = slackChannelName
            self.slackTeamId = slackTeamId
            self.snsTopicArns = snsTopicArns
            self.tags = tags
            self.userAuthorizationRequired = userAuthorizationRequired
        }

        public func validate(name: String) throws {
            try self.validate(self.configurationName, name: "configurationName", parent: name, max: 128)
            try self.validate(self.configurationName, name: "configurationName", parent: name, min: 1)
            try self.validate(self.configurationName, name: "configurationName", parent: name, pattern: "^[A-Za-z0-9-_]+$")
            try self.guardrailPolicyArns?.forEach {
                try validate($0, name: "guardrailPolicyArns[]", parent: name, max: 1163)
                try validate($0, name: "guardrailPolicyArns[]", parent: name, min: 11)
                try validate($0, name: "guardrailPolicyArns[]", parent: name, pattern: "^(^$|(?!.*\\/aws-service-role\\/.*)arn:aws:iam:[A-Za-z0-9_\\/.-]{0,63}:[A-Za-z0-9_\\/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_\\/+=,@.-]{0,1023})$")
            }
            try self.validate(self.iamRoleArn, name: "iamRoleArn", parent: name, max: 1224)
            try self.validate(self.iamRoleArn, name: "iamRoleArn", parent: name, min: 12)
            try self.validate(self.iamRoleArn, name: "iamRoleArn", parent: name, pattern: "^arn:aws:[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            try self.validate(self.loggingLevel, name: "loggingLevel", parent: name, max: 5)
            try self.validate(self.loggingLevel, name: "loggingLevel", parent: name, min: 4)
            try self.validate(self.loggingLevel, name: "loggingLevel", parent: name, pattern: "^(ERROR|INFO|NONE)$")
            try self.validate(self.slackChannelId, name: "slackChannelId", parent: name, max: 255)
            try self.validate(self.slackChannelId, name: "slackChannelId", parent: name, min: 1)
            try self.validate(self.slackChannelId, name: "slackChannelId", parent: name, pattern: "^[A-Za-z0-9]+$")
            try self.validate(self.slackChannelName, name: "slackChannelName", parent: name, max: 255)
            try self.validate(self.slackChannelName, name: "slackChannelName", parent: name, min: 1)
            try self.validate(self.slackTeamId, name: "slackTeamId", parent: name, max: 255)
            try self.validate(self.slackTeamId, name: "slackTeamId", parent: name, min: 1)
            try self.validate(self.slackTeamId, name: "slackTeamId", parent: name, pattern: "^[0-9A-Z]{1,255}$")
            try self.snsTopicArns?.forEach {
                try validate($0, name: "snsTopicArns[]", parent: name, max: 1224)
                try validate($0, name: "snsTopicArns[]", parent: name, min: 12)
                try validate($0, name: "snsTopicArns[]", parent: name, pattern: "^arn:aws:[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            }
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case configurationName = "ConfigurationName"
            case guardrailPolicyArns = "GuardrailPolicyArns"
            case iamRoleArn = "IamRoleArn"
            case loggingLevel = "LoggingLevel"
            case slackChannelId = "SlackChannelId"
            case slackChannelName = "SlackChannelName"
            case slackTeamId = "SlackTeamId"
            case snsTopicArns = "SnsTopicArns"
            case tags = "Tags"
            case userAuthorizationRequired = "UserAuthorizationRequired"
        }
    }

    public struct CreateSlackChannelConfigurationResult: AWSDecodableShape {
        /// The configuration for a Slack channel configured with AWS Chatbot.
        public let channelConfiguration: SlackChannelConfiguration?

        @inlinable
        public init(channelConfiguration: SlackChannelConfiguration? = nil) {
            self.channelConfiguration = channelConfiguration
        }

        private enum CodingKeys: String, CodingKey {
            case channelConfiguration = "ChannelConfiguration"
        }
    }

    public struct CreateTeamsChannelConfigurationRequest: AWSEncodableShape {
        /// The ID of the Microsoft Teams channel.
        public let channelId: String
        /// The name of the Microsoft Teams channel.
        public let channelName: String?
        /// The name of the configuration.
        public let configurationName: String
        /// The list of IAM policy ARNs that are applied as channel guardrails. The AWS managed AdministratorAccess policy is applied by default if this is not set.
        public let guardrailPolicyArns: [String]?
        /// A user-defined role that AWS Chatbot assumes. This is not the service-linked role. For more information, see IAM policies for AWS Chatbot in the  AWS Chatbot Administrator Guide.
        public let iamRoleArn: String
        /// Logging levels include ERROR, INFO, or NONE.
        public let loggingLevel: String?
        /// The Amazon Resource Names (ARNs) of the SNS topics that deliver notifications to AWS Chatbot.
        public let snsTopicArns: [String]?
        /// A map of tags assigned to a resource. A tag is a string-to-string map of key-value pairs.
        public let tags: [Tag]?
        ///  The ID of the Microsoft Teams authorized with AWS Chatbot. To get the team ID, you must perform the initial authorization flow with Microsoft Teams in the AWS Chatbot console. Then you can copy and paste the team ID from the console. For more information, see Step 1: Configure a Microsoft Teams client in the  AWS Chatbot Administrator Guide.
        public let teamId: String
        /// The name of the Microsoft Teams Team.
        public let teamName: String?
        /// The ID of the Microsoft Teams tenant.
        public let tenantId: String
        /// Enables use of a user role requirement in your chat configuration.
        public let userAuthorizationRequired: Bool?

        @inlinable
        public init(channelId: String, channelName: String? = nil, configurationName: String, guardrailPolicyArns: [String]? = nil, iamRoleArn: String, loggingLevel: String? = nil, snsTopicArns: [String]? = nil, tags: [Tag]? = nil, teamId: String, teamName: String? = nil, tenantId: String, userAuthorizationRequired: Bool? = nil) {
            self.channelId = channelId
            self.channelName = channelName
            self.configurationName = configurationName
            self.guardrailPolicyArns = guardrailPolicyArns
            self.iamRoleArn = iamRoleArn
            self.loggingLevel = loggingLevel
            self.snsTopicArns = snsTopicArns
            self.tags = tags
            self.teamId = teamId
            self.teamName = teamName
            self.tenantId = tenantId
            self.userAuthorizationRequired = userAuthorizationRequired
        }

        public func validate(name: String) throws {
            try self.validate(self.channelId, name: "channelId", parent: name, max: 255)
            try self.validate(self.channelId, name: "channelId", parent: name, min: 1)
            try self.validate(self.channelId, name: "channelId", parent: name, pattern: "^([a-zA-Z0-9-_=+\\/.,])*%3[aA]([a-zA-Z0-9-_=+\\/.,])*%40([a-zA-Z0-9-_=+\\/.,])*$")
            try self.validate(self.channelName, name: "channelName", parent: name, max: 1000)
            try self.validate(self.channelName, name: "channelName", parent: name, min: 1)
            try self.validate(self.channelName, name: "channelName", parent: name, pattern: "^(.*)$")
            try self.validate(self.configurationName, name: "configurationName", parent: name, max: 128)
            try self.validate(self.configurationName, name: "configurationName", parent: name, min: 1)
            try self.validate(self.configurationName, name: "configurationName", parent: name, pattern: "^[A-Za-z0-9-_]+$")
            try self.guardrailPolicyArns?.forEach {
                try validate($0, name: "guardrailPolicyArns[]", parent: name, max: 1163)
                try validate($0, name: "guardrailPolicyArns[]", parent: name, min: 11)
                try validate($0, name: "guardrailPolicyArns[]", parent: name, pattern: "^(^$|(?!.*\\/aws-service-role\\/.*)arn:aws:iam:[A-Za-z0-9_\\/.-]{0,63}:[A-Za-z0-9_\\/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_\\/+=,@.-]{0,1023})$")
            }
            try self.validate(self.iamRoleArn, name: "iamRoleArn", parent: name, max: 1224)
            try self.validate(self.iamRoleArn, name: "iamRoleArn", parent: name, min: 12)
            try self.validate(self.iamRoleArn, name: "iamRoleArn", parent: name, pattern: "^arn:aws:[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            try self.validate(self.loggingLevel, name: "loggingLevel", parent: name, max: 5)
            try self.validate(self.loggingLevel, name: "loggingLevel", parent: name, min: 4)
            try self.validate(self.loggingLevel, name: "loggingLevel", parent: name, pattern: "^(ERROR|INFO|NONE)$")
            try self.snsTopicArns?.forEach {
                try validate($0, name: "snsTopicArns[]", parent: name, max: 1224)
                try validate($0, name: "snsTopicArns[]", parent: name, min: 12)
                try validate($0, name: "snsTopicArns[]", parent: name, pattern: "^arn:aws:[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            }
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.teamId, name: "teamId", parent: name, max: 36)
            try self.validate(self.teamId, name: "teamId", parent: name, min: 36)
            try self.validate(self.teamId, name: "teamId", parent: name, pattern: "^[0-9A-Fa-f]{8}(?:-[0-9A-Fa-f]{4}){3}-[0-9A-Fa-f]{12}$")
            try self.validate(self.teamName, name: "teamName", parent: name, max: 255)
            try self.validate(self.teamName, name: "teamName", parent: name, min: 1)
            try self.validate(self.teamName, name: "teamName", parent: name, pattern: "^(.*)$")
            try self.validate(self.tenantId, name: "tenantId", parent: name, max: 36)
            try self.validate(self.tenantId, name: "tenantId", parent: name, min: 36)
            try self.validate(self.tenantId, name: "tenantId", parent: name, pattern: "^[0-9A-Fa-f]{8}(?:-[0-9A-Fa-f]{4}){3}-[0-9A-Fa-f]{12}$")
        }

        private enum CodingKeys: String, CodingKey {
            case channelId = "ChannelId"
            case channelName = "ChannelName"
            case configurationName = "ConfigurationName"
            case guardrailPolicyArns = "GuardrailPolicyArns"
            case iamRoleArn = "IamRoleArn"
            case loggingLevel = "LoggingLevel"
            case snsTopicArns = "SnsTopicArns"
            case tags = "Tags"
            case teamId = "TeamId"
            case teamName = "TeamName"
            case tenantId = "TenantId"
            case userAuthorizationRequired = "UserAuthorizationRequired"
        }
    }

    public struct CreateTeamsChannelConfigurationResult: AWSDecodableShape {
        /// The configuration for a Microsoft Teams channel configured with AWS Chatbot.
        public let channelConfiguration: TeamsChannelConfiguration?

        @inlinable
        public init(channelConfiguration: TeamsChannelConfiguration? = nil) {
            self.channelConfiguration = channelConfiguration
        }

        private enum CodingKeys: String, CodingKey {
            case channelConfiguration = "ChannelConfiguration"
        }
    }

    public struct CustomAction: AWSDecodableShape {
        /// The name of the custom action that is included in the ARN.
        public let actionName: String?
        /// The name used to invoke this action in the chat channel. For example, @aws run my-alias.
        public let aliasName: String?
        /// Defines when this custom action button should be attached to a notification.
        public let attachments: [CustomActionAttachment]?
        /// The fully defined Amazon Resource Name (ARN) of the custom action.
        public let customActionArn: String
        /// The definition of the command to run when invoked an alias or as an action button.
        public let definition: CustomActionDefinition

        @inlinable
        public init(actionName: String? = nil, aliasName: String? = nil, attachments: [CustomActionAttachment]? = nil, customActionArn: String, definition: CustomActionDefinition) {
            self.actionName = actionName
            self.aliasName = aliasName
            self.attachments = attachments
            self.customActionArn = customActionArn
            self.definition = definition
        }

        private enum CodingKeys: String, CodingKey {
            case actionName = "ActionName"
            case aliasName = "AliasName"
            case attachments = "Attachments"
            case customActionArn = "CustomActionArn"
            case definition = "Definition"
        }
    }

    public struct CustomActionAttachment: AWSEncodableShape & AWSDecodableShape {
        /// The text of the button that appears on the notification.
        public let buttonText: String?
        /// The criteria for when a button should be shown based on values in the notification.
        public let criteria: [CustomActionAttachmentCriteria]?
        /// The type of notification that the custom action should be attached to.
        public let notificationType: String?
        /// The variables to extract from the notification.
        public let variables: [String: String]?

        @inlinable
        public init(buttonText: String? = nil, criteria: [CustomActionAttachmentCriteria]? = nil, notificationType: String? = nil, variables: [String: String]? = nil) {
            self.buttonText = buttonText
            self.criteria = criteria
            self.notificationType = notificationType
            self.variables = variables
        }

        public func validate(name: String) throws {
            try self.validate(self.buttonText, name: "buttonText", parent: name, max: 50)
            try self.validate(self.buttonText, name: "buttonText", parent: name, min: 1)
            try self.validate(self.buttonText, name: "buttonText", parent: name, pattern: "^[\\S\\s]+$")
            try self.validate(self.criteria, name: "criteria", parent: name, max: 5)
            try self.validate(self.criteria, name: "criteria", parent: name, min: 1)
            try self.validate(self.notificationType, name: "notificationType", parent: name, max: 100)
            try self.validate(self.notificationType, name: "notificationType", parent: name, min: 1)
            try self.validate(self.notificationType, name: "notificationType", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.variables, name: "variables", parent: name, max: 5)
            try self.validate(self.variables, name: "variables", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case buttonText = "ButtonText"
            case criteria = "Criteria"
            case notificationType = "NotificationType"
            case variables = "Variables"
        }
    }

    public struct CustomActionAttachmentCriteria: AWSEncodableShape & AWSDecodableShape {
        /// The operation to perform on the named variable.
        public let `operator`: CustomActionAttachmentCriteriaOperator
        /// A value that is compared with the actual value of the variable based on the behavior of the operator.
        public let value: String?
        /// The name of the variable to operate on.
        public let variableName: String

        @inlinable
        public init(operator: CustomActionAttachmentCriteriaOperator, value: String? = nil, variableName: String) {
            self.`operator` = `operator`
            self.value = value
            self.variableName = variableName
        }

        private enum CodingKeys: String, CodingKey {
            case `operator` = "Operator"
            case value = "Value"
            case variableName = "VariableName"
        }
    }

    public struct CustomActionDefinition: AWSEncodableShape & AWSDecodableShape {
        /// The command string to run which may include variables by prefixing with a dollar sign ($).
        public let commandText: String

        @inlinable
        public init(commandText: String) {
            self.commandText = commandText
        }

        private enum CodingKeys: String, CodingKey {
            case commandText = "CommandText"
        }
    }

    public struct DeleteChimeWebhookConfigurationRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the ChimeWebhookConfiguration to delete.
        public let chatConfigurationArn: String

        @inlinable
        public init(chatConfigurationArn: String) {
            self.chatConfigurationArn = chatConfigurationArn
        }

        public func validate(name: String) throws {
            try self.validate(self.chatConfigurationArn, name: "chatConfigurationArn", parent: name, max: 1169)
            try self.validate(self.chatConfigurationArn, name: "chatConfigurationArn", parent: name, min: 19)
            try self.validate(self.chatConfigurationArn, name: "chatConfigurationArn", parent: name, pattern: "^arn:aws:(wheatley|chatbot):[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,1023}$")
        }

        private enum CodingKeys: String, CodingKey {
            case chatConfigurationArn = "ChatConfigurationArn"
        }
    }

    public struct DeleteChimeWebhookConfigurationResult: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteCustomActionRequest: AWSEncodableShape {
        /// The fully defined ARN of the custom action.
        public let customActionArn: String

        @inlinable
        public init(customActionArn: String) {
            self.customActionArn = customActionArn
        }

        public func validate(name: String) throws {
            try self.validate(self.customActionArn, name: "customActionArn", parent: name, max: 1011)
            try self.validate(self.customActionArn, name: "customActionArn", parent: name, min: 1)
            try self.validate(self.customActionArn, name: "customActionArn", parent: name, pattern: "^arn:aws:chatbot:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:custom-action/[a-zA-Z0-9_-]{1,64}$")
        }

        private enum CodingKeys: String, CodingKey {
            case customActionArn = "CustomActionArn"
        }
    }

    public struct DeleteCustomActionResult: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteMicrosoftTeamsUserIdentityRequest: AWSEncodableShape {
        /// The ARN of the MicrosoftTeamsChannelConfiguration associated with the user identity to delete.
        public let chatConfigurationArn: String
        /// The Microsoft Teams user ID.
        public let userId: String

        @inlinable
        public init(chatConfigurationArn: String, userId: String) {
            self.chatConfigurationArn = chatConfigurationArn
            self.userId = userId
        }

        public func validate(name: String) throws {
            try self.validate(self.chatConfigurationArn, name: "chatConfigurationArn", parent: name, max: 1169)
            try self.validate(self.chatConfigurationArn, name: "chatConfigurationArn", parent: name, min: 19)
            try self.validate(self.chatConfigurationArn, name: "chatConfigurationArn", parent: name, pattern: "^arn:aws:(wheatley|chatbot):[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            try self.validate(self.userId, name: "userId", parent: name, max: 36)
            try self.validate(self.userId, name: "userId", parent: name, min: 36)
            try self.validate(self.userId, name: "userId", parent: name, pattern: "^[0-9A-Fa-f]{8}(?:-[0-9A-Fa-f]{4}){3}-[0-9A-Fa-f]{12}$")
        }

        private enum CodingKeys: String, CodingKey {
            case chatConfigurationArn = "ChatConfigurationArn"
            case userId = "UserId"
        }
    }

    public struct DeleteMicrosoftTeamsUserIdentityResult: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteSlackChannelConfigurationRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the SlackChannelConfiguration to delete.
        public let chatConfigurationArn: String

        @inlinable
        public init(chatConfigurationArn: String) {
            self.chatConfigurationArn = chatConfigurationArn
        }

        public func validate(name: String) throws {
            try self.validate(self.chatConfigurationArn, name: "chatConfigurationArn", parent: name, max: 1169)
            try self.validate(self.chatConfigurationArn, name: "chatConfigurationArn", parent: name, min: 19)
            try self.validate(self.chatConfigurationArn, name: "chatConfigurationArn", parent: name, pattern: "^arn:aws:(wheatley|chatbot):[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,1023}$")
        }

        private enum CodingKeys: String, CodingKey {
            case chatConfigurationArn = "ChatConfigurationArn"
        }
    }

    public struct DeleteSlackChannelConfigurationResult: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteSlackUserIdentityRequest: AWSEncodableShape {
        /// The ARN of the SlackChannelConfiguration associated with the user identity to delete.
        public let chatConfigurationArn: String
        /// The ID of the Slack workspace authorized with AWS Chatbot.
        public let slackTeamId: String
        /// The ID of the user in Slack
        public let slackUserId: String

        @inlinable
        public init(chatConfigurationArn: String, slackTeamId: String, slackUserId: String) {
            self.chatConfigurationArn = chatConfigurationArn
            self.slackTeamId = slackTeamId
            self.slackUserId = slackUserId
        }

        public func validate(name: String) throws {
            try self.validate(self.chatConfigurationArn, name: "chatConfigurationArn", parent: name, max: 1169)
            try self.validate(self.chatConfigurationArn, name: "chatConfigurationArn", parent: name, min: 19)
            try self.validate(self.chatConfigurationArn, name: "chatConfigurationArn", parent: name, pattern: "^arn:aws:(wheatley|chatbot):[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            try self.validate(self.slackTeamId, name: "slackTeamId", parent: name, max: 255)
            try self.validate(self.slackTeamId, name: "slackTeamId", parent: name, min: 1)
            try self.validate(self.slackTeamId, name: "slackTeamId", parent: name, pattern: "^[0-9A-Z]{1,255}$")
            try self.validate(self.slackUserId, name: "slackUserId", parent: name, max: 255)
            try self.validate(self.slackUserId, name: "slackUserId", parent: name, min: 1)
            try self.validate(self.slackUserId, name: "slackUserId", parent: name, pattern: "^(.*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case chatConfigurationArn = "ChatConfigurationArn"
            case slackTeamId = "SlackTeamId"
            case slackUserId = "SlackUserId"
        }
    }

    public struct DeleteSlackUserIdentityResult: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteSlackWorkspaceAuthorizationRequest: AWSEncodableShape {
        /// The ID of the Slack workspace authorized with AWS Chatbot.
        public let slackTeamId: String

        @inlinable
        public init(slackTeamId: String) {
            self.slackTeamId = slackTeamId
        }

        public func validate(name: String) throws {
            try self.validate(self.slackTeamId, name: "slackTeamId", parent: name, max: 255)
            try self.validate(self.slackTeamId, name: "slackTeamId", parent: name, min: 1)
            try self.validate(self.slackTeamId, name: "slackTeamId", parent: name, pattern: "^[0-9A-Z]{1,255}$")
        }

        private enum CodingKeys: String, CodingKey {
            case slackTeamId = "SlackTeamId"
        }
    }

    public struct DeleteSlackWorkspaceAuthorizationResult: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteTeamsChannelConfigurationRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the MicrosoftTeamsChannelConfiguration associated with the user identity to delete.
        public let chatConfigurationArn: String

        @inlinable
        public init(chatConfigurationArn: String) {
            self.chatConfigurationArn = chatConfigurationArn
        }

        public func validate(name: String) throws {
            try self.validate(self.chatConfigurationArn, name: "chatConfigurationArn", parent: name, max: 1169)
            try self.validate(self.chatConfigurationArn, name: "chatConfigurationArn", parent: name, min: 19)
            try self.validate(self.chatConfigurationArn, name: "chatConfigurationArn", parent: name, pattern: "^arn:aws:(wheatley|chatbot):[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,1023}$")
        }

        private enum CodingKeys: String, CodingKey {
            case chatConfigurationArn = "ChatConfigurationArn"
        }
    }

    public struct DeleteTeamsChannelConfigurationResult: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteTeamsConfiguredTeamRequest: AWSEncodableShape {
        /// The ID of the Microsoft Teams team authorized with AWS Chatbot. To get the team ID, you must perform the initial authorization flow with Microsoft Teams in the AWS Chatbot console. Then you can copy and paste the team ID from the console. For more information, see Step 1: Configure a Microsoft Teams client in the  AWS Chatbot Administrator Guide.
        public let teamId: String

        @inlinable
        public init(teamId: String) {
            self.teamId = teamId
        }

        public func validate(name: String) throws {
            try self.validate(self.teamId, name: "teamId", parent: name, max: 36)
            try self.validate(self.teamId, name: "teamId", parent: name, min: 36)
            try self.validate(self.teamId, name: "teamId", parent: name, pattern: "^[0-9A-Fa-f]{8}(?:-[0-9A-Fa-f]{4}){3}-[0-9A-Fa-f]{12}$")
        }

        private enum CodingKeys: String, CodingKey {
            case teamId = "TeamId"
        }
    }

    public struct DeleteTeamsConfiguredTeamResult: AWSDecodableShape {
        public init() {}
    }

    public struct DescribeChimeWebhookConfigurationsRequest: AWSEncodableShape {
        /// An optional Amazon Resource Name (ARN) of a ChimeWebhookConfiguration to describe.
        public let chatConfigurationArn: String?
        /// The maximum number of results to include in the response. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.
        public let maxResults: Int?
        /// An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.
        public let nextToken: String?

        @inlinable
        public init(chatConfigurationArn: String? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.chatConfigurationArn = chatConfigurationArn
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.chatConfigurationArn, name: "chatConfigurationArn", parent: name, max: 1169)
            try self.validate(self.chatConfigurationArn, name: "chatConfigurationArn", parent: name, min: 19)
            try self.validate(self.chatConfigurationArn, name: "chatConfigurationArn", parent: name, pattern: "^arn:aws:(wheatley|chatbot):[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 1276)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[a-zA-Z0-9=\\/+_.\\-,#:\\\\\"{}]{4,1276}$")
        }

        private enum CodingKeys: String, CodingKey {
            case chatConfigurationArn = "ChatConfigurationArn"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct DescribeChimeWebhookConfigurationsResult: AWSDecodableShape {
        /// An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.
        public let nextToken: String?
        /// A list of Amazon Chime webhooks associated with the account.
        public let webhookConfigurations: [ChimeWebhookConfiguration]?

        @inlinable
        public init(nextToken: String? = nil, webhookConfigurations: [ChimeWebhookConfiguration]? = nil) {
            self.nextToken = nextToken
            self.webhookConfigurations = webhookConfigurations
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case webhookConfigurations = "WebhookConfigurations"
        }
    }

    public struct DescribeSlackChannelConfigurationsRequest: AWSEncodableShape {
        /// An optional Amazon Resource Name (ARN) of a SlackChannelConfiguration to describe.
        public let chatConfigurationArn: String?
        /// The maximum number of results to include in the response. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.
        public let maxResults: Int?
        ///  An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.
        public let nextToken: String?

        @inlinable
        public init(chatConfigurationArn: String? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.chatConfigurationArn = chatConfigurationArn
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.chatConfigurationArn, name: "chatConfigurationArn", parent: name, max: 1169)
            try self.validate(self.chatConfigurationArn, name: "chatConfigurationArn", parent: name, min: 19)
            try self.validate(self.chatConfigurationArn, name: "chatConfigurationArn", parent: name, pattern: "^arn:aws:(wheatley|chatbot):[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 1276)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[a-zA-Z0-9=\\/+_.\\-,#:\\\\\"{}]{4,1276}$")
        }

        private enum CodingKeys: String, CodingKey {
            case chatConfigurationArn = "ChatConfigurationArn"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct DescribeSlackChannelConfigurationsResult: AWSDecodableShape {
        /// An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.
        public let nextToken: String?
        /// A list of Slack channel configurations.
        public let slackChannelConfigurations: [SlackChannelConfiguration]?

        @inlinable
        public init(nextToken: String? = nil, slackChannelConfigurations: [SlackChannelConfiguration]? = nil) {
            self.nextToken = nextToken
            self.slackChannelConfigurations = slackChannelConfigurations
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case slackChannelConfigurations = "SlackChannelConfigurations"
        }
    }

    public struct DescribeSlackUserIdentitiesRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the SlackChannelConfiguration associated with the user identities to describe.
        public let chatConfigurationArn: String?
        /// The maximum number of results to include in the response. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.
        public let maxResults: Int?
        ///  An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.
        public let nextToken: String?

        @inlinable
        public init(chatConfigurationArn: String? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.chatConfigurationArn = chatConfigurationArn
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.chatConfigurationArn, name: "chatConfigurationArn", parent: name, max: 1169)
            try self.validate(self.chatConfigurationArn, name: "chatConfigurationArn", parent: name, min: 19)
            try self.validate(self.chatConfigurationArn, name: "chatConfigurationArn", parent: name, pattern: "^arn:aws:(wheatley|chatbot):[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 1276)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[a-zA-Z0-9=\\/+_.\\-,#:\\\\\"{}]{4,1276}$")
        }

        private enum CodingKeys: String, CodingKey {
            case chatConfigurationArn = "ChatConfigurationArn"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct DescribeSlackUserIdentitiesResult: AWSDecodableShape {
        ///  An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.
        public let nextToken: String?
        /// A list of Slack User Identities.
        public let slackUserIdentities: [SlackUserIdentity]?

        @inlinable
        public init(nextToken: String? = nil, slackUserIdentities: [SlackUserIdentity]? = nil) {
            self.nextToken = nextToken
            self.slackUserIdentities = slackUserIdentities
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case slackUserIdentities = "SlackUserIdentities"
        }
    }

    public struct DescribeSlackWorkspacesRequest: AWSEncodableShape {
        /// The maximum number of results to include in the response. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.
        public let maxResults: Int?
        ///  An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.
        public let nextToken: String?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 1276)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[a-zA-Z0-9=\\/+_.\\-,#:\\\\\"{}]{4,1276}$")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct DescribeSlackWorkspacesResult: AWSDecodableShape {
        ///  An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.
        public let nextToken: String?
        /// A list of Slack workspaces registered with AWS Chatbot.
        public let slackWorkspaces: [SlackWorkspace]?

        @inlinable
        public init(nextToken: String? = nil, slackWorkspaces: [SlackWorkspace]? = nil) {
            self.nextToken = nextToken
            self.slackWorkspaces = slackWorkspaces
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case slackWorkspaces = "SlackWorkspaces"
        }
    }

    public struct DisassociateFromConfigurationRequest: AWSEncodableShape {
        /// The channel configuration the resource is being disassociated from.
        public let chatConfiguration: String
        /// The resource (for example, a custom action) Amazon Resource Name (ARN) to unlink.
        public let resource: String

        @inlinable
        public init(chatConfiguration: String, resource: String) {
            self.chatConfiguration = chatConfiguration
            self.resource = resource
        }

        public func validate(name: String) throws {
            try self.validate(self.chatConfiguration, name: "chatConfiguration", parent: name, max: 1169)
            try self.validate(self.chatConfiguration, name: "chatConfiguration", parent: name, min: 19)
            try self.validate(self.chatConfiguration, name: "chatConfiguration", parent: name, pattern: "^arn:aws:(wheatley|chatbot):[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            try self.validate(self.resource, name: "resource", parent: name, max: 1011)
            try self.validate(self.resource, name: "resource", parent: name, min: 1)
            try self.validate(self.resource, name: "resource", parent: name, pattern: "^arn:aws:chatbot:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:custom-action/[a-zA-Z0-9_-]{1,64}$")
        }

        private enum CodingKeys: String, CodingKey {
            case chatConfiguration = "ChatConfiguration"
            case resource = "Resource"
        }
    }

    public struct DisassociateFromConfigurationResult: AWSDecodableShape {
        public init() {}
    }

    public struct GetAccountPreferencesRequest: AWSEncodableShape {
        public init() {}
    }

    public struct GetAccountPreferencesResult: AWSDecodableShape {
        /// The preferences related to AWS Chatbot usage in the calling AWS account.
        public let accountPreferences: AccountPreferences?

        @inlinable
        public init(accountPreferences: AccountPreferences? = nil) {
            self.accountPreferences = accountPreferences
        }

        private enum CodingKeys: String, CodingKey {
            case accountPreferences = "AccountPreferences"
        }
    }

    public struct GetCustomActionRequest: AWSEncodableShape {
        /// Returns the fully defined Amazon Resource Name (ARN) of the custom action.
        public let customActionArn: String

        @inlinable
        public init(customActionArn: String) {
            self.customActionArn = customActionArn
        }

        public func validate(name: String) throws {
            try self.validate(self.customActionArn, name: "customActionArn", parent: name, max: 1011)
            try self.validate(self.customActionArn, name: "customActionArn", parent: name, min: 1)
            try self.validate(self.customActionArn, name: "customActionArn", parent: name, pattern: "^arn:aws:chatbot:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:custom-action/[a-zA-Z0-9_-]{1,64}$")
        }

        private enum CodingKeys: String, CodingKey {
            case customActionArn = "CustomActionArn"
        }
    }

    public struct GetCustomActionResult: AWSDecodableShape {
        /// Returns the custom action.
        public let customAction: CustomAction?

        @inlinable
        public init(customAction: CustomAction? = nil) {
            self.customAction = customAction
        }

        private enum CodingKeys: String, CodingKey {
            case customAction = "CustomAction"
        }
    }

    public struct GetTeamsChannelConfigurationRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the MicrosoftTeamsChannelConfiguration to retrieve.
        public let chatConfigurationArn: String

        @inlinable
        public init(chatConfigurationArn: String) {
            self.chatConfigurationArn = chatConfigurationArn
        }

        public func validate(name: String) throws {
            try self.validate(self.chatConfigurationArn, name: "chatConfigurationArn", parent: name, max: 1169)
            try self.validate(self.chatConfigurationArn, name: "chatConfigurationArn", parent: name, min: 19)
            try self.validate(self.chatConfigurationArn, name: "chatConfigurationArn", parent: name, pattern: "^arn:aws:(wheatley|chatbot):[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,1023}$")
        }

        private enum CodingKeys: String, CodingKey {
            case chatConfigurationArn = "ChatConfigurationArn"
        }
    }

    public struct GetTeamsChannelConfigurationResult: AWSDecodableShape {
        /// The configuration for a Microsoft Teams channel configured with AWS Chatbot.
        public let channelConfiguration: TeamsChannelConfiguration?

        @inlinable
        public init(channelConfiguration: TeamsChannelConfiguration? = nil) {
            self.channelConfiguration = channelConfiguration
        }

        private enum CodingKeys: String, CodingKey {
            case channelConfiguration = "ChannelConfiguration"
        }
    }

    public struct ListAssociationsRequest: AWSEncodableShape {
        /// The channel configuration to list associations for.
        public let chatConfiguration: String
        /// The maximum number of results to include in the response. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.
        public let maxResults: Int?
        /// An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.
        public let nextToken: String?

        @inlinable
        public init(chatConfiguration: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.chatConfiguration = chatConfiguration
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.chatConfiguration, name: "chatConfiguration", parent: name, max: 1169)
            try self.validate(self.chatConfiguration, name: "chatConfiguration", parent: name, min: 19)
            try self.validate(self.chatConfiguration, name: "chatConfiguration", parent: name, pattern: "^arn:aws:(wheatley|chatbot):[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,1023}$")
        }

        private enum CodingKeys: String, CodingKey {
            case chatConfiguration = "ChatConfiguration"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListAssociationsResult: AWSDecodableShape {
        /// The resources associated with this channel configuration.
        public let associations: [AssociationListing]
        /// An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.
        public let nextToken: String?

        @inlinable
        public init(associations: [AssociationListing], nextToken: String? = nil) {
            self.associations = associations
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case associations = "Associations"
            case nextToken = "NextToken"
        }
    }

    public struct ListCustomActionsRequest: AWSEncodableShape {
        /// The maximum number of results to include in the response. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.
        public let maxResults: Int?
        /// An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.
        public let nextToken: String?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListCustomActionsResult: AWSDecodableShape {
        /// A list of custom actions.
        public let customActions: [String]
        /// An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.
        public let nextToken: String?

        @inlinable
        public init(customActions: [String], nextToken: String? = nil) {
            self.customActions = customActions
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case customActions = "CustomActions"
            case nextToken = "NextToken"
        }
    }

    public struct ListMicrosoftTeamsConfiguredTeamsRequest: AWSEncodableShape {
        /// The maximum number of results to include in the response. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.
        public let maxResults: Int?
        /// An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.
        public let nextToken: String?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 1276)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[a-zA-Z0-9=\\/+_.\\-,#:\\\\\"{}]{4,1276}$")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListMicrosoftTeamsConfiguredTeamsResult: AWSDecodableShape {
        /// A list of teams in Microsoft Teams that are configured with AWS Chatbot.
        public let configuredTeams: [ConfiguredTeam]?
        /// An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.
        public let nextToken: String?

        @inlinable
        public init(configuredTeams: [ConfiguredTeam]? = nil, nextToken: String? = nil) {
            self.configuredTeams = configuredTeams
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case configuredTeams = "ConfiguredTeams"
            case nextToken = "NextToken"
        }
    }

    public struct ListMicrosoftTeamsUserIdentitiesRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the MicrosoftTeamsChannelConfiguration associated with the user identities to list.
        public let chatConfigurationArn: String?
        /// The maximum number of results to include in the response. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.
        public let maxResults: Int?
        /// An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.
        public let nextToken: String?

        @inlinable
        public init(chatConfigurationArn: String? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.chatConfigurationArn = chatConfigurationArn
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.chatConfigurationArn, name: "chatConfigurationArn", parent: name, max: 1169)
            try self.validate(self.chatConfigurationArn, name: "chatConfigurationArn", parent: name, min: 19)
            try self.validate(self.chatConfigurationArn, name: "chatConfigurationArn", parent: name, pattern: "^arn:aws:(wheatley|chatbot):[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 1276)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[a-zA-Z0-9=\\/+_.\\-,#:\\\\\"{}]{4,1276}$")
        }

        private enum CodingKeys: String, CodingKey {
            case chatConfigurationArn = "ChatConfigurationArn"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListMicrosoftTeamsUserIdentitiesResult: AWSDecodableShape {
        /// An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.
        public let nextToken: String?
        /// User level permissions associated to a channel configuration.
        public let teamsUserIdentities: [TeamsUserIdentity]?

        @inlinable
        public init(nextToken: String? = nil, teamsUserIdentities: [TeamsUserIdentity]? = nil) {
            self.nextToken = nextToken
            self.teamsUserIdentities = teamsUserIdentities
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case teamsUserIdentities = "TeamsUserIdentities"
        }
    }

    public struct ListTagsForResourceRequest: AWSEncodableShape {
        /// The ARN of the resource to list tags for.
        public let resourceARN: String

        @inlinable
        public init(resourceARN: String) {
            self.resourceARN = resourceARN
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, max: 1011)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, min: 1)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, pattern: "^arn:aws:(wheatley|chatbot):[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,1023}$")
        }

        private enum CodingKeys: String, CodingKey {
            case resourceARN = "ResourceARN"
        }
    }

    public struct ListTagsForResourceResponse: AWSDecodableShape {
        /// Key-value pairs that are assigned to a resource, usually for the purpose of grouping and searching for items. Tags are metadata that you define.
        public let tags: [Tag]?

        @inlinable
        public init(tags: [Tag]? = nil) {
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case tags = "Tags"
        }
    }

    public struct ListTeamsChannelConfigurationsRequest: AWSEncodableShape {
        /// The maximum number of results to include in the response. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.
        public let maxResults: Int?
        /// An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.
        public let nextToken: String?
        ///  The ID of the Microsoft Teams authorized with AWS Chatbot. To get the team ID, you must perform the initial authorization flow with Microsoft Teams in the AWS Chatbot console. Then you can copy and paste the team ID from the console. For more information, see Step 1: Configure a Microsoft Teams client in the  AWS Chatbot Administrator Guide.
        public let teamId: String?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, teamId: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.teamId = teamId
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 1276)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[a-zA-Z0-9=\\/+_.\\-,#:\\\\\"{}]{4,1276}$")
            try self.validate(self.teamId, name: "teamId", parent: name, max: 36)
            try self.validate(self.teamId, name: "teamId", parent: name, min: 36)
            try self.validate(self.teamId, name: "teamId", parent: name, pattern: "^[0-9A-Fa-f]{8}(?:-[0-9A-Fa-f]{4}){3}-[0-9A-Fa-f]{12}$")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case teamId = "TeamId"
        }
    }

    public struct ListTeamsChannelConfigurationsResult: AWSDecodableShape {
        /// An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.
        public let nextToken: String?
        /// A list of AWS Chatbot channel configurations for Microsoft Teams.
        public let teamChannelConfigurations: [TeamsChannelConfiguration]?

        @inlinable
        public init(nextToken: String? = nil, teamChannelConfigurations: [TeamsChannelConfiguration]? = nil) {
            self.nextToken = nextToken
            self.teamChannelConfigurations = teamChannelConfigurations
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case teamChannelConfigurations = "TeamChannelConfigurations"
        }
    }

    public struct SlackChannelConfiguration: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the SlackChannelConfiguration.
        public let chatConfigurationArn: String
        /// The name of the configuration.
        public let configurationName: String?
        /// The list of IAM policy ARNs that are applied as channel guardrails. The AWS managed AdministratorAccess policy is applied by default if this is not set.
        public let guardrailPolicyArns: [String]?
        /// A user-defined role that AWS Chatbot assumes. This is not the service-linked role. For more information, see IAM policies for AWS Chatbot in the  AWS Chatbot Administrator Guide.
        public let iamRoleArn: String
        /// Logging levels include ERROR, INFO, or NONE.
        public let loggingLevel: String?
        /// The ID of the Slack channel. To get this ID, open Slack, right click on the channel name in the left pane, then choose Copy Link. The channel ID is the 9-character string at the end of the URL. For example, ABCBBLZZZ.
        public let slackChannelId: String
        /// The name of the Slack channel.
        public let slackChannelName: String
        /// The ID of the Slack workspace authorized with Amazon Chime.
        public let slackTeamId: String
        /// Name of the Slack workspace.
        public let slackTeamName: String
        /// The ARNs of the SNS topics that deliver notifications to AWS Chatbot.
        public let snsTopicArns: [String]
        /// Either ENABLED or DISABLED. The resource returns DISABLED if the organization's AWS Chatbot policy has explicitly denied that configuration.
        /// 	  For example, if Amazon Chime is disabled.
        public let state: String?
        /// Provided if State is DISABLED. Provides context as to why the resource is disabled.
        public let stateReason: String?
        /// A map of tags assigned to a resource. A tag is a string-to-string map of key-value pairs.
        public let tags: [Tag]?
        /// Enables use of a user role requirement in your chat configuration.
        public let userAuthorizationRequired: Bool?

        @inlinable
        public init(chatConfigurationArn: String, configurationName: String? = nil, guardrailPolicyArns: [String]? = nil, iamRoleArn: String, loggingLevel: String? = nil, slackChannelId: String, slackChannelName: String, slackTeamId: String, slackTeamName: String, snsTopicArns: [String], state: String? = nil, stateReason: String? = nil, tags: [Tag]? = nil, userAuthorizationRequired: Bool? = nil) {
            self.chatConfigurationArn = chatConfigurationArn
            self.configurationName = configurationName
            self.guardrailPolicyArns = guardrailPolicyArns
            self.iamRoleArn = iamRoleArn
            self.loggingLevel = loggingLevel
            self.slackChannelId = slackChannelId
            self.slackChannelName = slackChannelName
            self.slackTeamId = slackTeamId
            self.slackTeamName = slackTeamName
            self.snsTopicArns = snsTopicArns
            self.state = state
            self.stateReason = stateReason
            self.tags = tags
            self.userAuthorizationRequired = userAuthorizationRequired
        }

        private enum CodingKeys: String, CodingKey {
            case chatConfigurationArn = "ChatConfigurationArn"
            case configurationName = "ConfigurationName"
            case guardrailPolicyArns = "GuardrailPolicyArns"
            case iamRoleArn = "IamRoleArn"
            case loggingLevel = "LoggingLevel"
            case slackChannelId = "SlackChannelId"
            case slackChannelName = "SlackChannelName"
            case slackTeamId = "SlackTeamId"
            case slackTeamName = "SlackTeamName"
            case snsTopicArns = "SnsTopicArns"
            case state = "State"
            case stateReason = "StateReason"
            case tags = "Tags"
            case userAuthorizationRequired = "UserAuthorizationRequired"
        }
    }

    public struct SlackUserIdentity: AWSDecodableShape {
        /// The AWS user identity ARN used to associate a Slack user ID with an IAM Role.
        public let awsUserIdentity: String?
        /// The Amazon Resource Name (ARN) of the SlackChannelConfiguration associated with the user identity to delete.
        public let chatConfigurationArn: String
        /// A user-defined role that AWS Chatbot assumes. This is not the service-linked role. For more information, see IAM policies for AWS Chatbot in the  AWS Chatbot Administrator Guide.
        public let iamRoleArn: String
        /// The ID of the Slack workspace authorized with AWS Chatbot.
        public let slackTeamId: String
        /// The ID of the user in Slack
        public let slackUserId: String

        @inlinable
        public init(awsUserIdentity: String? = nil, chatConfigurationArn: String, iamRoleArn: String, slackTeamId: String, slackUserId: String) {
            self.awsUserIdentity = awsUserIdentity
            self.chatConfigurationArn = chatConfigurationArn
            self.iamRoleArn = iamRoleArn
            self.slackTeamId = slackTeamId
            self.slackUserId = slackUserId
        }

        private enum CodingKeys: String, CodingKey {
            case awsUserIdentity = "AwsUserIdentity"
            case chatConfigurationArn = "ChatConfigurationArn"
            case iamRoleArn = "IamRoleArn"
            case slackTeamId = "SlackTeamId"
            case slackUserId = "SlackUserId"
        }
    }

    public struct SlackWorkspace: AWSDecodableShape {
        /// The ID of the Slack workspace authorized with AWS Chatbot.
        public let slackTeamId: String
        /// The name of the Slack workspace.
        public let slackTeamName: String
        /// Either ENABLED or DISABLED. The resource returns DISABLED if the organization's AWS Chatbot policy has explicitly denied that configuration.
        /// 	  For example, if Amazon Chime is disabled.
        public let state: String?
        /// Provided if State is DISABLED. Provides context as to why the resource is disabled.
        public let stateReason: String?

        @inlinable
        public init(slackTeamId: String, slackTeamName: String, state: String? = nil, stateReason: String? = nil) {
            self.slackTeamId = slackTeamId
            self.slackTeamName = slackTeamName
            self.state = state
            self.stateReason = stateReason
        }

        private enum CodingKeys: String, CodingKey {
            case slackTeamId = "SlackTeamId"
            case slackTeamName = "SlackTeamName"
            case state = "State"
            case stateReason = "StateReason"
        }
    }

    public struct Tag: AWSEncodableShape & AWSDecodableShape {
        /// The key of the tag.
        public let tagKey: String
        /// The value of the tag.
        public let tagValue: String

        @inlinable
        public init(tagKey: String, tagValue: String) {
            self.tagKey = tagKey
            self.tagValue = tagValue
        }

        public func validate(name: String) throws {
            try self.validate(self.tagKey, name: "tagKey", parent: name, max: 128)
            try self.validate(self.tagKey, name: "tagKey", parent: name, min: 1)
            try self.validate(self.tagValue, name: "tagValue", parent: name, max: 256)
        }

        private enum CodingKeys: String, CodingKey {
            case tagKey = "TagKey"
            case tagValue = "TagValue"
        }
    }

    public struct TagResourceRequest: AWSEncodableShape {
        /// The ARN of the configuration.
        public let resourceARN: String
        /// A list of tags to apply to the configuration.
        public let tags: [Tag]

        @inlinable
        public init(resourceARN: String, tags: [Tag]) {
            self.resourceARN = resourceARN
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, max: 1011)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, min: 1)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, pattern: "^arn:aws:(wheatley|chatbot):[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            try self.tags.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case resourceARN = "ResourceARN"
            case tags = "Tags"
        }
    }

    public struct TagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct TeamsChannelConfiguration: AWSDecodableShape {
        /// The ID of the Microsoft Teams channel.
        public let channelId: String
        /// The name of the Microsoft Teams channel.
        public let channelName: String?
        /// The Amazon Resource Name (ARN) of the MicrosoftTeamsChannelConfiguration associated with the user identity to delete.
        public let chatConfigurationArn: String
        /// The name of the configuration.
        public let configurationName: String?
        /// The list of IAM policy ARNs that are applied as channel guardrails. The AWS managed AdministratorAccess policy is applied by default if this is not set.
        public let guardrailPolicyArns: [String]?
        /// A user-defined role that AWS Chatbot assumes. This is not the service-linked role. For more information, see IAM policies for AWS Chatbot in the  AWS Chatbot Administrator Guide.
        public let iamRoleArn: String
        /// Logging levels include ERROR, INFO, or NONE.
        public let loggingLevel: String?
        /// The Amazon Resource Names (ARNs) of the SNS topics that deliver notifications to AWS Chatbot.
        public let snsTopicArns: [String]
        /// Either ENABLED or DISABLED. The resource returns DISABLED if the organization's AWS Chatbot policy has explicitly denied that configuration.
        /// 	  For example, if Amazon Chime is disabled.
        public let state: String?
        /// Provided if State is DISABLED. Provides context as to why the resource is disabled.
        public let stateReason: String?
        /// A map of tags assigned to a resource. A tag is a string-to-string map of key-value pairs.
        public let tags: [Tag]?
        ///  The ID of the Microsoft Teams authorized with AWS Chatbot. To get the team ID, you must perform the initial authorization flow with Microsoft Teams in the AWS Chatbot console. Then you can copy and paste the team ID from the console. For more information, see Step 1: Configure a Microsoft Teams client in the  AWS Chatbot Administrator Guide.
        public let teamId: String
        /// The name of the Microsoft Teams Team.
        public let teamName: String?
        /// The ID of the Microsoft Teams tenant.
        public let tenantId: String
        /// Enables use of a user role requirement in your chat configuration.
        public let userAuthorizationRequired: Bool?

        @inlinable
        public init(channelId: String, channelName: String? = nil, chatConfigurationArn: String, configurationName: String? = nil, guardrailPolicyArns: [String]? = nil, iamRoleArn: String, loggingLevel: String? = nil, snsTopicArns: [String], state: String? = nil, stateReason: String? = nil, tags: [Tag]? = nil, teamId: String, teamName: String? = nil, tenantId: String, userAuthorizationRequired: Bool? = nil) {
            self.channelId = channelId
            self.channelName = channelName
            self.chatConfigurationArn = chatConfigurationArn
            self.configurationName = configurationName
            self.guardrailPolicyArns = guardrailPolicyArns
            self.iamRoleArn = iamRoleArn
            self.loggingLevel = loggingLevel
            self.snsTopicArns = snsTopicArns
            self.state = state
            self.stateReason = stateReason
            self.tags = tags
            self.teamId = teamId
            self.teamName = teamName
            self.tenantId = tenantId
            self.userAuthorizationRequired = userAuthorizationRequired
        }

        private enum CodingKeys: String, CodingKey {
            case channelId = "ChannelId"
            case channelName = "ChannelName"
            case chatConfigurationArn = "ChatConfigurationArn"
            case configurationName = "ConfigurationName"
            case guardrailPolicyArns = "GuardrailPolicyArns"
            case iamRoleArn = "IamRoleArn"
            case loggingLevel = "LoggingLevel"
            case snsTopicArns = "SnsTopicArns"
            case state = "State"
            case stateReason = "StateReason"
            case tags = "Tags"
            case teamId = "TeamId"
            case teamName = "TeamName"
            case tenantId = "TenantId"
            case userAuthorizationRequired = "UserAuthorizationRequired"
        }
    }

    public struct TeamsUserIdentity: AWSDecodableShape {
        /// The AWS user identity ARN used to associate a Microsoft Teams user Identity with an IAM Role.
        public let awsUserIdentity: String?
        /// The Amazon Resource Name (ARN) of the MicrosoftTeamsChannelConfiguration associated with the user identity to delete.
        public let chatConfigurationArn: String
        /// A user-defined role that AWS Chatbot assumes. This is not the service-linked role. For more information, see IAM policies for AWS Chatbot in the  AWS Chatbot Administrator Guide.
        public let iamRoleArn: String
        ///  The ID of the Microsoft Teams authorized with AWS Chatbot. To get the team ID, you must perform the initial authorization flow with Microsoft Teams in the AWS Chatbot console. Then you can copy and paste the team ID from the console. For more information, see Step 1: Configure a Microsoft Teams client in the  AWS Chatbot Administrator Guide.
        public let teamId: String
        /// The ID of the Microsoft Teams channel.
        public let teamsChannelId: String?
        /// The ID of the Microsoft Teams tenant.
        public let teamsTenantId: String?
        /// The Microsoft Teams user ID.
        public let userId: String?

        @inlinable
        public init(awsUserIdentity: String? = nil, chatConfigurationArn: String, iamRoleArn: String, teamId: String, teamsChannelId: String? = nil, teamsTenantId: String? = nil, userId: String? = nil) {
            self.awsUserIdentity = awsUserIdentity
            self.chatConfigurationArn = chatConfigurationArn
            self.iamRoleArn = iamRoleArn
            self.teamId = teamId
            self.teamsChannelId = teamsChannelId
            self.teamsTenantId = teamsTenantId
            self.userId = userId
        }

        private enum CodingKeys: String, CodingKey {
            case awsUserIdentity = "AwsUserIdentity"
            case chatConfigurationArn = "ChatConfigurationArn"
            case iamRoleArn = "IamRoleArn"
            case teamId = "TeamId"
            case teamsChannelId = "TeamsChannelId"
            case teamsTenantId = "TeamsTenantId"
            case userId = "UserId"
        }
    }

    public struct UntagResourceRequest: AWSEncodableShape {
        /// The value of the resource that will have the tag removed. An Amazon Resource Name (ARN) is an identifier for a specific AWS resource, such as a server, user, or role.
        public let resourceARN: String
        /// TagKeys are key-value pairs assigned to ARNs that can be used to group and search for resources by type. This metadata can be attached to resources for any purpose.
        public let tagKeys: [String]

        @inlinable
        public init(resourceARN: String, tagKeys: [String]) {
            self.resourceARN = resourceARN
            self.tagKeys = tagKeys
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, max: 1011)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, min: 1)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, pattern: "^arn:aws:(wheatley|chatbot):[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            try self.tagKeys.forEach {
                try validate($0, name: "tagKeys[]", parent: name, max: 128)
                try validate($0, name: "tagKeys[]", parent: name, min: 1)
            }
            try self.validate(self.tagKeys, name: "tagKeys", parent: name, max: 200)
        }

        private enum CodingKeys: String, CodingKey {
            case resourceARN = "ResourceARN"
            case tagKeys = "TagKeys"
        }
    }

    public struct UntagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateAccountPreferencesRequest: AWSEncodableShape {
        /// Turns on training data collection. This helps improve the AWS Chatbot experience by allowing AWS Chatbot to store and use your customer information, such as AWS Chatbot configurations, notifications, user inputs, AWS Chatbot generated responses, and interaction data. This data helps us to continuously improve and develop Artificial Intelligence (AI) technologies. Your data is not shared with any third parties and is protected using sophisticated controls to prevent unauthorized access and misuse. AWS Chatbot does not store or use interactions in chat channels with Amazon Q for training AI technologies for AWS Chatbot.
        public let trainingDataCollectionEnabled: Bool?
        /// Enables use of a user role requirement in your chat configuration.
        public let userAuthorizationRequired: Bool?

        @inlinable
        public init(trainingDataCollectionEnabled: Bool? = nil, userAuthorizationRequired: Bool? = nil) {
            self.trainingDataCollectionEnabled = trainingDataCollectionEnabled
            self.userAuthorizationRequired = userAuthorizationRequired
        }

        private enum CodingKeys: String, CodingKey {
            case trainingDataCollectionEnabled = "TrainingDataCollectionEnabled"
            case userAuthorizationRequired = "UserAuthorizationRequired"
        }
    }

    public struct UpdateAccountPreferencesResult: AWSDecodableShape {
        /// Preferences related to AWS Chatbot usage in the calling AWS account.
        public let accountPreferences: AccountPreferences?

        @inlinable
        public init(accountPreferences: AccountPreferences? = nil) {
            self.accountPreferences = accountPreferences
        }

        private enum CodingKeys: String, CodingKey {
            case accountPreferences = "AccountPreferences"
        }
    }

    public struct UpdateChimeWebhookConfigurationRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the ChimeWebhookConfiguration to update.
        public let chatConfigurationArn: String
        /// A user-defined role that AWS Chatbot assumes. This is not the service-linked role. For more information, see IAM policies for AWS Chatbot in the  AWS Chatbot Administrator Guide.
        public let iamRoleArn: String?
        /// Logging levels include ERROR, INFO, or NONE.
        public let loggingLevel: String?
        /// The ARNs of the SNS topics that deliver notifications to AWS Chatbot.
        public let snsTopicArns: [String]?
        /// A description of the webhook. We recommend using the convention RoomName/WebhookName. For more information, see Tutorial: Get started with Amazon Chime in the  AWS Chatbot Administrator Guide.
        public let webhookDescription: String?
        /// The URL for the Amazon Chime webhook.
        public let webhookUrl: String?

        @inlinable
        public init(chatConfigurationArn: String, iamRoleArn: String? = nil, loggingLevel: String? = nil, snsTopicArns: [String]? = nil, webhookDescription: String? = nil, webhookUrl: String? = nil) {
            self.chatConfigurationArn = chatConfigurationArn
            self.iamRoleArn = iamRoleArn
            self.loggingLevel = loggingLevel
            self.snsTopicArns = snsTopicArns
            self.webhookDescription = webhookDescription
            self.webhookUrl = webhookUrl
        }

        public func validate(name: String) throws {
            try self.validate(self.chatConfigurationArn, name: "chatConfigurationArn", parent: name, max: 1169)
            try self.validate(self.chatConfigurationArn, name: "chatConfigurationArn", parent: name, min: 19)
            try self.validate(self.chatConfigurationArn, name: "chatConfigurationArn", parent: name, pattern: "^arn:aws:(wheatley|chatbot):[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            try self.validate(self.iamRoleArn, name: "iamRoleArn", parent: name, max: 1224)
            try self.validate(self.iamRoleArn, name: "iamRoleArn", parent: name, min: 12)
            try self.validate(self.iamRoleArn, name: "iamRoleArn", parent: name, pattern: "^arn:aws:[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            try self.validate(self.loggingLevel, name: "loggingLevel", parent: name, max: 5)
            try self.validate(self.loggingLevel, name: "loggingLevel", parent: name, min: 4)
            try self.validate(self.loggingLevel, name: "loggingLevel", parent: name, pattern: "^(ERROR|INFO|NONE)$")
            try self.snsTopicArns?.forEach {
                try validate($0, name: "snsTopicArns[]", parent: name, max: 1224)
                try validate($0, name: "snsTopicArns[]", parent: name, min: 12)
                try validate($0, name: "snsTopicArns[]", parent: name, pattern: "^arn:aws:[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            }
            try self.validate(self.webhookDescription, name: "webhookDescription", parent: name, max: 255)
            try self.validate(self.webhookDescription, name: "webhookDescription", parent: name, min: 1)
            try self.validate(self.webhookUrl, name: "webhookUrl", parent: name, max: 255)
            try self.validate(self.webhookUrl, name: "webhookUrl", parent: name, min: 1)
            try self.validate(self.webhookUrl, name: "webhookUrl", parent: name, pattern: "^https://hooks\\.chime\\.aws/incomingwebhooks/[A-Za-z0-9\\-]+?\\?token=[A-Za-z0-9\\-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case chatConfigurationArn = "ChatConfigurationArn"
            case iamRoleArn = "IamRoleArn"
            case loggingLevel = "LoggingLevel"
            case snsTopicArns = "SnsTopicArns"
            case webhookDescription = "WebhookDescription"
            case webhookUrl = "WebhookUrl"
        }
    }

    public struct UpdateChimeWebhookConfigurationResult: AWSDecodableShape {
        /// A Amazon Chime webhook configuration.
        public let webhookConfiguration: ChimeWebhookConfiguration?

        @inlinable
        public init(webhookConfiguration: ChimeWebhookConfiguration? = nil) {
            self.webhookConfiguration = webhookConfiguration
        }

        private enum CodingKeys: String, CodingKey {
            case webhookConfiguration = "WebhookConfiguration"
        }
    }

    public struct UpdateCustomActionRequest: AWSEncodableShape {
        /// The name used to invoke this action in the chat channel. For example, @aws run my-alias.
        public let aliasName: String?
        /// Defines when this custom action button should be attached to a notification.
        public let attachments: [CustomActionAttachment]?
        /// The fully defined Amazon Resource Name (ARN) of the custom action.
        public let customActionArn: String
        /// The definition of the command to run when invoked as an alias or as an action button.
        public let definition: CustomActionDefinition

        @inlinable
        public init(aliasName: String? = nil, attachments: [CustomActionAttachment]? = nil, customActionArn: String, definition: CustomActionDefinition) {
            self.aliasName = aliasName
            self.attachments = attachments
            self.customActionArn = customActionArn
            self.definition = definition
        }

        public func validate(name: String) throws {
            try self.validate(self.aliasName, name: "aliasName", parent: name, max: 30)
            try self.validate(self.aliasName, name: "aliasName", parent: name, min: 1)
            try self.validate(self.aliasName, name: "aliasName", parent: name, pattern: "^[A-Za-z0-9-_]+$")
            try self.attachments?.forEach {
                try $0.validate(name: "\(name).attachments[]")
            }
            try self.validate(self.customActionArn, name: "customActionArn", parent: name, max: 1011)
            try self.validate(self.customActionArn, name: "customActionArn", parent: name, min: 1)
            try self.validate(self.customActionArn, name: "customActionArn", parent: name, pattern: "^arn:aws:chatbot:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:custom-action/[a-zA-Z0-9_-]{1,64}$")
        }

        private enum CodingKeys: String, CodingKey {
            case aliasName = "AliasName"
            case attachments = "Attachments"
            case customActionArn = "CustomActionArn"
            case definition = "Definition"
        }
    }

    public struct UpdateCustomActionResult: AWSDecodableShape {
        /// The fully defined ARN of the custom action.
        public let customActionArn: String

        @inlinable
        public init(customActionArn: String) {
            self.customActionArn = customActionArn
        }

        private enum CodingKeys: String, CodingKey {
            case customActionArn = "CustomActionArn"
        }
    }

    public struct UpdateSlackChannelConfigurationRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the SlackChannelConfiguration to update.
        public let chatConfigurationArn: String
        /// The list of IAM policy ARNs that are applied as channel guardrails. The AWS managed AdministratorAccess policy is applied by default if this is not set.
        public let guardrailPolicyArns: [String]?
        /// A user-defined role that AWS Chatbot assumes. This is not the service-linked role. For more information, see IAM policies for AWS Chatbot in the  AWS Chatbot Administrator Guide.
        public let iamRoleArn: String?
        /// Logging levels include ERROR, INFO, or NONE.
        public let loggingLevel: String?
        /// The ID of the Slack channel. To get this ID, open Slack, right click on the channel name in the left pane, then choose Copy Link. The channel ID is the 9-character string at the end of the URL. For example, ABCBBLZZZ.
        public let slackChannelId: String
        /// The name of the Slack channel.
        public let slackChannelName: String?
        /// The Amazon Resource Names (ARNs) of the SNS topics that deliver notifications to AWS Chatbot.
        public let snsTopicArns: [String]?
        /// Enables use of a user role requirement in your chat configuration.
        public let userAuthorizationRequired: Bool?

        @inlinable
        public init(chatConfigurationArn: String, guardrailPolicyArns: [String]? = nil, iamRoleArn: String? = nil, loggingLevel: String? = nil, slackChannelId: String, slackChannelName: String? = nil, snsTopicArns: [String]? = nil, userAuthorizationRequired: Bool? = nil) {
            self.chatConfigurationArn = chatConfigurationArn
            self.guardrailPolicyArns = guardrailPolicyArns
            self.iamRoleArn = iamRoleArn
            self.loggingLevel = loggingLevel
            self.slackChannelId = slackChannelId
            self.slackChannelName = slackChannelName
            self.snsTopicArns = snsTopicArns
            self.userAuthorizationRequired = userAuthorizationRequired
        }

        public func validate(name: String) throws {
            try self.validate(self.chatConfigurationArn, name: "chatConfigurationArn", parent: name, max: 1169)
            try self.validate(self.chatConfigurationArn, name: "chatConfigurationArn", parent: name, min: 19)
            try self.validate(self.chatConfigurationArn, name: "chatConfigurationArn", parent: name, pattern: "^arn:aws:(wheatley|chatbot):[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            try self.guardrailPolicyArns?.forEach {
                try validate($0, name: "guardrailPolicyArns[]", parent: name, max: 1163)
                try validate($0, name: "guardrailPolicyArns[]", parent: name, min: 11)
                try validate($0, name: "guardrailPolicyArns[]", parent: name, pattern: "^(^$|(?!.*\\/aws-service-role\\/.*)arn:aws:iam:[A-Za-z0-9_\\/.-]{0,63}:[A-Za-z0-9_\\/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_\\/+=,@.-]{0,1023})$")
            }
            try self.validate(self.iamRoleArn, name: "iamRoleArn", parent: name, max: 1224)
            try self.validate(self.iamRoleArn, name: "iamRoleArn", parent: name, min: 12)
            try self.validate(self.iamRoleArn, name: "iamRoleArn", parent: name, pattern: "^arn:aws:[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            try self.validate(self.loggingLevel, name: "loggingLevel", parent: name, max: 5)
            try self.validate(self.loggingLevel, name: "loggingLevel", parent: name, min: 4)
            try self.validate(self.loggingLevel, name: "loggingLevel", parent: name, pattern: "^(ERROR|INFO|NONE)$")
            try self.validate(self.slackChannelId, name: "slackChannelId", parent: name, max: 255)
            try self.validate(self.slackChannelId, name: "slackChannelId", parent: name, min: 1)
            try self.validate(self.slackChannelId, name: "slackChannelId", parent: name, pattern: "^[A-Za-z0-9]+$")
            try self.validate(self.slackChannelName, name: "slackChannelName", parent: name, max: 255)
            try self.validate(self.slackChannelName, name: "slackChannelName", parent: name, min: 1)
            try self.snsTopicArns?.forEach {
                try validate($0, name: "snsTopicArns[]", parent: name, max: 1224)
                try validate($0, name: "snsTopicArns[]", parent: name, min: 12)
                try validate($0, name: "snsTopicArns[]", parent: name, pattern: "^arn:aws:[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case chatConfigurationArn = "ChatConfigurationArn"
            case guardrailPolicyArns = "GuardrailPolicyArns"
            case iamRoleArn = "IamRoleArn"
            case loggingLevel = "LoggingLevel"
            case slackChannelId = "SlackChannelId"
            case slackChannelName = "SlackChannelName"
            case snsTopicArns = "SnsTopicArns"
            case userAuthorizationRequired = "UserAuthorizationRequired"
        }
    }

    public struct UpdateSlackChannelConfigurationResult: AWSDecodableShape {
        /// The configuration for a Slack channel configured with AWS Chatbot.
        public let channelConfiguration: SlackChannelConfiguration?

        @inlinable
        public init(channelConfiguration: SlackChannelConfiguration? = nil) {
            self.channelConfiguration = channelConfiguration
        }

        private enum CodingKeys: String, CodingKey {
            case channelConfiguration = "ChannelConfiguration"
        }
    }

    public struct UpdateTeamsChannelConfigurationRequest: AWSEncodableShape {
        /// The ID of the Microsoft Teams channel.
        public let channelId: String
        /// The name of the Microsoft Teams channel.
        public let channelName: String?
        /// The Amazon Resource Name (ARN) of the TeamsChannelConfiguration to update.
        public let chatConfigurationArn: String
        /// The list of IAM policy ARNs that are applied as channel guardrails. The AWS managed AdministratorAccess policy is applied by default if this is not set.
        public let guardrailPolicyArns: [String]?
        /// A user-defined role that AWS Chatbot assumes. This is not the service-linked role. For more information, see IAM policies for AWS Chatbot in the  AWS Chatbot Administrator Guide.
        public let iamRoleArn: String?
        /// Logging levels include ERROR, INFO, or NONE.
        public let loggingLevel: String?
        /// The Amazon Resource Names (ARNs) of the SNS topics that deliver notifications to AWS Chatbot.
        public let snsTopicArns: [String]?
        /// Enables use of a user role requirement in your chat configuration.
        public let userAuthorizationRequired: Bool?

        @inlinable
        public init(channelId: String, channelName: String? = nil, chatConfigurationArn: String, guardrailPolicyArns: [String]? = nil, iamRoleArn: String? = nil, loggingLevel: String? = nil, snsTopicArns: [String]? = nil, userAuthorizationRequired: Bool? = nil) {
            self.channelId = channelId
            self.channelName = channelName
            self.chatConfigurationArn = chatConfigurationArn
            self.guardrailPolicyArns = guardrailPolicyArns
            self.iamRoleArn = iamRoleArn
            self.loggingLevel = loggingLevel
            self.snsTopicArns = snsTopicArns
            self.userAuthorizationRequired = userAuthorizationRequired
        }

        public func validate(name: String) throws {
            try self.validate(self.channelId, name: "channelId", parent: name, max: 255)
            try self.validate(self.channelId, name: "channelId", parent: name, min: 1)
            try self.validate(self.channelId, name: "channelId", parent: name, pattern: "^([a-zA-Z0-9-_=+\\/.,])*%3[aA]([a-zA-Z0-9-_=+\\/.,])*%40([a-zA-Z0-9-_=+\\/.,])*$")
            try self.validate(self.channelName, name: "channelName", parent: name, max: 1000)
            try self.validate(self.channelName, name: "channelName", parent: name, min: 1)
            try self.validate(self.channelName, name: "channelName", parent: name, pattern: "^(.*)$")
            try self.validate(self.chatConfigurationArn, name: "chatConfigurationArn", parent: name, max: 1169)
            try self.validate(self.chatConfigurationArn, name: "chatConfigurationArn", parent: name, min: 19)
            try self.validate(self.chatConfigurationArn, name: "chatConfigurationArn", parent: name, pattern: "^arn:aws:(wheatley|chatbot):[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            try self.guardrailPolicyArns?.forEach {
                try validate($0, name: "guardrailPolicyArns[]", parent: name, max: 1163)
                try validate($0, name: "guardrailPolicyArns[]", parent: name, min: 11)
                try validate($0, name: "guardrailPolicyArns[]", parent: name, pattern: "^(^$|(?!.*\\/aws-service-role\\/.*)arn:aws:iam:[A-Za-z0-9_\\/.-]{0,63}:[A-Za-z0-9_\\/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_\\/+=,@.-]{0,1023})$")
            }
            try self.validate(self.iamRoleArn, name: "iamRoleArn", parent: name, max: 1224)
            try self.validate(self.iamRoleArn, name: "iamRoleArn", parent: name, min: 12)
            try self.validate(self.iamRoleArn, name: "iamRoleArn", parent: name, pattern: "^arn:aws:[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            try self.validate(self.loggingLevel, name: "loggingLevel", parent: name, max: 5)
            try self.validate(self.loggingLevel, name: "loggingLevel", parent: name, min: 4)
            try self.validate(self.loggingLevel, name: "loggingLevel", parent: name, pattern: "^(ERROR|INFO|NONE)$")
            try self.snsTopicArns?.forEach {
                try validate($0, name: "snsTopicArns[]", parent: name, max: 1224)
                try validate($0, name: "snsTopicArns[]", parent: name, min: 12)
                try validate($0, name: "snsTopicArns[]", parent: name, pattern: "^arn:aws:[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case channelId = "ChannelId"
            case channelName = "ChannelName"
            case chatConfigurationArn = "ChatConfigurationArn"
            case guardrailPolicyArns = "GuardrailPolicyArns"
            case iamRoleArn = "IamRoleArn"
            case loggingLevel = "LoggingLevel"
            case snsTopicArns = "SnsTopicArns"
            case userAuthorizationRequired = "UserAuthorizationRequired"
        }
    }

    public struct UpdateTeamsChannelConfigurationResult: AWSDecodableShape {
        /// The configuration for a Microsoft Teams channel configured with AWS Chatbot.
        public let channelConfiguration: TeamsChannelConfiguration?

        @inlinable
        public init(channelConfiguration: TeamsChannelConfiguration? = nil) {
            self.channelConfiguration = channelConfiguration
        }

        private enum CodingKeys: String, CodingKey {
            case channelConfiguration = "ChannelConfiguration"
        }
    }
}

// MARK: - Errors

/// Error enum for Chatbot
public struct ChatbotErrorType: AWSErrorType {
    enum Code: String {
        case conflictException = "ConflictException"
        case createChimeWebhookConfigurationException = "CreateChimeWebhookConfigurationException"
        case createSlackChannelConfigurationException = "CreateSlackChannelConfigurationException"
        case createTeamsChannelConfigurationException = "CreateTeamsChannelConfigurationException"
        case deleteChimeWebhookConfigurationException = "DeleteChimeWebhookConfigurationException"
        case deleteMicrosoftTeamsUserIdentityException = "DeleteMicrosoftTeamsUserIdentityException"
        case deleteSlackChannelConfigurationException = "DeleteSlackChannelConfigurationException"
        case deleteSlackUserIdentityException = "DeleteSlackUserIdentityException"
        case deleteSlackWorkspaceAuthorizationFault = "DeleteSlackWorkspaceAuthorizationFault"
        case deleteTeamsChannelConfigurationException = "DeleteTeamsChannelConfigurationException"
        case deleteTeamsConfiguredTeamException = "DeleteTeamsConfiguredTeamException"
        case describeChimeWebhookConfigurationsException = "DescribeChimeWebhookConfigurationsException"
        case describeSlackChannelConfigurationsException = "DescribeSlackChannelConfigurationsException"
        case describeSlackUserIdentitiesException = "DescribeSlackUserIdentitiesException"
        case describeSlackWorkspacesException = "DescribeSlackWorkspacesException"
        case getAccountPreferencesException = "GetAccountPreferencesException"
        case getTeamsChannelConfigurationException = "GetTeamsChannelConfigurationException"
        case internalServiceError = "InternalServiceError"
        case invalidParameterException = "InvalidParameterException"
        case invalidRequestException = "InvalidRequestException"
        case limitExceededException = "LimitExceededException"
        case listMicrosoftTeamsConfiguredTeamsException = "ListMicrosoftTeamsConfiguredTeamsException"
        case listMicrosoftTeamsUserIdentitiesException = "ListMicrosoftTeamsUserIdentitiesException"
        case listTeamsChannelConfigurationsException = "ListTeamsChannelConfigurationsException"
        case resourceNotFoundException = "ResourceNotFoundException"
        case serviceUnavailableException = "ServiceUnavailableException"
        case tooManyTagsException = "TooManyTagsException"
        case unauthorizedException = "UnauthorizedException"
        case updateAccountPreferencesException = "UpdateAccountPreferencesException"
        case updateChimeWebhookConfigurationException = "UpdateChimeWebhookConfigurationException"
        case updateSlackChannelConfigurationException = "UpdateSlackChannelConfigurationException"
        case updateTeamsChannelConfigurationException = "UpdateTeamsChannelConfigurationException"
    }

    private let error: Code
    public let context: AWSErrorContext?

    /// initialize Chatbot
    public init?(errorCode: String, context: AWSErrorContext) {
        guard let error = Code(rawValue: errorCode) else { return nil }
        self.error = error
        self.context = context
    }

    internal init(_ error: Code) {
        self.error = error
        self.context = nil
    }

    /// return error code string
    public var errorCode: String { self.error.rawValue }

    /// There was an issue processing your request.
    public static var conflictException: Self { .init(.conflictException) }
    /// We can’t process your request right now because of a server issue. Try again later.
    public static var createChimeWebhookConfigurationException: Self { .init(.createChimeWebhookConfigurationException) }
    /// We can’t process your request right now because of a server issue. Try again later.
    public static var createSlackChannelConfigurationException: Self { .init(.createSlackChannelConfigurationException) }
    /// We can’t process your request right now because of a server issue. Try again later.
    public static var createTeamsChannelConfigurationException: Self { .init(.createTeamsChannelConfigurationException) }
    /// We can’t process your request right now because of a server issue. Try again later.
    public static var deleteChimeWebhookConfigurationException: Self { .init(.deleteChimeWebhookConfigurationException) }
    /// We can’t process your request right now because of a server issue. Try again later.
    public static var deleteMicrosoftTeamsUserIdentityException: Self { .init(.deleteMicrosoftTeamsUserIdentityException) }
    /// We can’t process your request right now because of a server issue. Try again later.
    public static var deleteSlackChannelConfigurationException: Self { .init(.deleteSlackChannelConfigurationException) }
    /// We can’t process your request right now because of a server issue. Try again later.
    public static var deleteSlackUserIdentityException: Self { .init(.deleteSlackUserIdentityException) }
    /// There was an issue deleting your Slack workspace.
    public static var deleteSlackWorkspaceAuthorizationFault: Self { .init(.deleteSlackWorkspaceAuthorizationFault) }
    /// We can’t process your request right now because of a server issue. Try again later.
    public static var deleteTeamsChannelConfigurationException: Self { .init(.deleteTeamsChannelConfigurationException) }
    /// We can’t process your request right now because of a server issue. Try again later.
    public static var deleteTeamsConfiguredTeamException: Self { .init(.deleteTeamsConfiguredTeamException) }
    /// We can’t process your request right now because of a server issue. Try again later.
    public static var describeChimeWebhookConfigurationsException: Self { .init(.describeChimeWebhookConfigurationsException) }
    /// We can’t process your request right now because of a server issue. Try again later.
    public static var describeSlackChannelConfigurationsException: Self { .init(.describeSlackChannelConfigurationsException) }
    /// We can’t process your request right now because of a server issue. Try again later.
    public static var describeSlackUserIdentitiesException: Self { .init(.describeSlackUserIdentitiesException) }
    /// We can’t process your request right now because of a server issue. Try again later.
    public static var describeSlackWorkspacesException: Self { .init(.describeSlackWorkspacesException) }
    /// We can’t process your request right now because of a server issue. Try again later.
    public static var getAccountPreferencesException: Self { .init(.getAccountPreferencesException) }
    /// We can’t process your request right now because of a server issue. Try again later.
    public static var getTeamsChannelConfigurationException: Self { .init(.getTeamsChannelConfigurationException) }
    /// Unexpected error during processing of request.
    public static var internalServiceError: Self { .init(.internalServiceError) }
    /// Your request input doesn't meet the constraints required by AWS Chatbot.
    public static var invalidParameterException: Self { .init(.invalidParameterException) }
    /// Your request input doesn't meet the constraints required by AWS Chatbot.
    public static var invalidRequestException: Self { .init(.invalidRequestException) }
    /// You have exceeded a service limit for AWS Chatbot.
    public static var limitExceededException: Self { .init(.limitExceededException) }
    /// We can’t process your request right now because of a server issue. Try again later.
    public static var listMicrosoftTeamsConfiguredTeamsException: Self { .init(.listMicrosoftTeamsConfiguredTeamsException) }
    /// We can’t process your request right now because of a server issue. Try again later.
    public static var listMicrosoftTeamsUserIdentitiesException: Self { .init(.listMicrosoftTeamsUserIdentitiesException) }
    /// We can’t process your request right now because of a server issue. Try again later.
    public static var listTeamsChannelConfigurationsException: Self { .init(.listTeamsChannelConfigurationsException) }
    /// We were unable to find the resource for your request
    public static var resourceNotFoundException: Self { .init(.resourceNotFoundException) }
    /// We can’t process your request right now because of a server issue. Try again later.
    public static var serviceUnavailableException: Self { .init(.serviceUnavailableException) }
    /// The supplied list of tags contains too many tags.
    public static var tooManyTagsException: Self { .init(.tooManyTagsException) }
    /// The request was rejected because it doesn't have valid credentials for the target resource.
    public static var unauthorizedException: Self { .init(.unauthorizedException) }
    /// We can’t process your request right now because of a server issue. Try again later.
    public static var updateAccountPreferencesException: Self { .init(.updateAccountPreferencesException) }
    /// We can’t process your request right now because of a server issue. Try again later.
    public static var updateChimeWebhookConfigurationException: Self { .init(.updateChimeWebhookConfigurationException) }
    /// We can’t process your request right now because of a server issue. Try again later.
    public static var updateSlackChannelConfigurationException: Self { .init(.updateSlackChannelConfigurationException) }
    /// We can’t process your request right now because of a server issue. Try again later.
    public static var updateTeamsChannelConfigurationException: Self { .init(.updateTeamsChannelConfigurationException) }
}

extension ChatbotErrorType: Equatable {
    public static func == (lhs: ChatbotErrorType, rhs: ChatbotErrorType) -> Bool {
        lhs.error == rhs.error
    }
}

extension ChatbotErrorType: CustomStringConvertible {
    public var description: String {
        return "\(self.error.rawValue): \(self.message ?? "")"
    }
}
